home *** CD-ROM | disk | FTP | other *** search
/ Internet Info 1994 March / Internet Info CD-ROM (Walnut Creek) (March 1994).iso / networking / mail / smail / smail.diff-3.1.24-3.1.25 < prev    next >
Encoding:
Text File  |  1991-12-10  |  47.1 KB  |  1,620 lines

  1. To: smail-alpha@veritas.com (Smail3 Patch Distribution List)
  2. Subject: Patch #25 to Smail3.1
  3.  
  4. I will be away from my computer for several weeks starting December 13,
  5. through the first week of January.  As a parting gesture just before
  6. making myself incommunicado, I offer this patch to fix many of the
  7. problems that have been reported in the last two patches (primarily
  8. patch #23).  Since patch #23 was a very large patch with quite a bit
  9. of new functionality in it (compared to most smail patches, anyway),
  10. the release has shown itself to have more than the usual number of
  11. obvious bugs.  Such is life, I suppose.
  12.  
  13. If you have problems with the patch, I will be around until Thursday
  14. afternoon.  After that, you will have to resolve the problems among
  15. yourselves through smail3-wizards@cs.athabascau.ca, or by going to
  16. one of the previous patch levels.
  17. -- 
  18.     tron |-<=>-|        ARPAnet:  veritas!tron@apple.com
  19.       tron@veritas.com        UUCPnet:  {apple,pyramid}!veritas!tron
  20. -----------------------------------------------------------------------
  21. Notes about patch #25
  22.  
  23. Release 3.1.25 is primarily a bug fix patch release to smail3.1.24.
  24. It includes some portability enhancements, but no new features.  This
  25. release contains the following changes and bug fixes:
  26.  
  27. 1.  A bug in the mailbox locking code was introduced in 3.1.23 that
  28.     caused basic non-POSIX System V systems to dereference an
  29.     uninitialized pointer, which often caused core dumps.
  30.  
  31. 2.  The installation scripts will now use an rm/mv sequence as a
  32.     backup if mv doesn't work.  HP-UX 7.0 will fail to rename a file
  33.     if the destination is being executed (even if the destination is
  34.     not the only link).  However, an rm will work, so an rm/mv
  35.     sequence should fix this problem.
  36.  
  37. 3.  HP-UX 8.0 is now listed as POSIX compliant.
  38.  
  39. 4.  A few of the longer identifiers in src/default.c were too long for
  40.     some SCO C compilers.  The troublesome identifiers were shortened.
  41.  
  42. 5.  The YP support added into mkdbm in release 3.1.23 used
  43.     gethostname, explicitly, which many systems do not support.  The
  44.     command can now be compiled (like most of smail) to use
  45.     gethostname, uname, or an ASCII file containing a hostname.
  46.  
  47. 6.  The LOCAL_MAIL_FILE variable can now be set in the EDITME file
  48.     (although it is not described).
  49.  
  50. 7.  The UUWHO_USE_DBM EDITME flag didn't work, because it was not
  51.     being propogated to the defs.h file.  It also didn't work if NDBM
  52.     was specified in HAVE, but DBM was not, even though compatibility
  53.     code was added in releaes 3.1.23 to make this work.  Finally,
  54.     mkuuwho didn't work with DBM because of a mixup in some shell case
  55.     patterns.
  56.  
  57. 8.  Added an official patch to pathalias that was apparently posted to
  58.     the net some time ago, but which I didn't know about.
  59.  
  60. 9.  appendfile.c will no longer include <sys/time.h> in an attempt to
  61.     get the utimbuf structure.  Your system should define utimbuf in
  62.     either <utime.h>, or <sys/types.h>, or should define
  63.     DECLARE_UTIMBUF to get smail to define utimbuf itself.
  64.  
  65. 10. Smail will now call siginterrupt for 4.3BSD, in an attempt to have
  66.     signals interrupt the accept() system call.
  67.  
  68. 11. The bind router can now use the res_search function rather than
  69.     the older res_mkquery.  This apparently works better, at least
  70.     under recent SunOS releases.
  71.  
  72. 12. The samples/bind/routers file incorrectly mentioned the defname
  73.     attribute when it should have mentioned defnames.
  74.  
  75. 13. Made an attempt at fixing the dbmclose macro in dbm_compat.h so
  76.     that it didn't cause compiler warnings on machines that don't
  77.     handle (void)0 so well with the ?: operator.
  78.  
  79. 14. The compatbility getopt() function is not compiled if libc has
  80.     one, to avoid differences with any declared function prototypes.
  81.  
  82. 15. The bind router will now declare h_errno, rather than expecting
  83.     the <netdb.h> header file to define it.
  84.  
  85. 16. Some inconsistent uses of a sometimes allocated pointer were fixed
  86.     in unsharmap.c that may have caused core dumps on some machines.
  87.  
  88. 17. HP-UX 7.0 cannot handle a newline within a pattern in a shell case
  89.     statement.  Thus, just for HP-UX 7.0 smail will use a much slower
  90.     operation (involving an echo to "wc -l") in conf/lib/mkdefs.sh,
  91.     when building defs.sed files.  Variables which contain newlines
  92.     are weeded out when generating defs.sed files, to ensure that the
  93.     files are parsable.
  94. -----------------------------------------------------------------------
  95. The following changes should be applied to the version 3.1.24.1
  96. sources for smail, to produce smail3.1.25.1.  The version number
  97. that you are running can be found in the `level' file at the top of
  98. the source tree.  It can also be found by running the command:
  99.  
  100.     smail -V -v
  101.  
  102. For information on smail releases and how you can obtain a complete
  103. smail release or a patch release, send mail to the address:
  104.  
  105.     smail-patch@veritas.com
  106.  
  107. or to the !-style address:
  108.  
  109.     ...{amdahl,apple,pyramid,uunet}!veritas!smail-patch
  110.  
  111. include as the first line of the message one of the following lines:
  112.  
  113.     send help <addr>
  114.     send index <addr>
  115.     send patch <num> <addr>
  116.  
  117. where <num> is a single patch number (e.g., 17) or a single patch range
  118. (e.g., 4-7) and where <addr> is your address relative to veritas.  The
  119. <addr> is optional and if omitted your return path is used.
  120.  
  121. The following patch should be applied to the smail3.1.24.1 release.  To
  122. apply this patch, obtain a copy of the program patch, release 2.0 or
  123. higher.  The patch utility has been posted to the USENET group
  124. comp.sources.unix, and is available from most sites that archive
  125. public domain programs.  Apply this patch using the command:
  126.  
  127.     patch -p [-d /SMAIL_SOURCE_PATH] < this_patch_file
  128.  
  129. where "-d /SMAIL_SOURCE_PATH" specifies a root based path to the top of
  130. the smail source tree, and where "patchfile" is the name of the file in
  131. which this patch is stored.  The "-d /SMAIL_SOURCE_PATH" is not needed
  132. if the current directory is already the top of the smail source tree.
  133.  
  134. NOTE: Don't forget the -p !!!!!
  135.  
  136. Prereq: PATCH_NUMBER=24
  137. Index: patchnum
  138. ***************
  139. *** 1,3 ****
  140. ! # @(#)patchnum    1.12 20 Nov 1991 01:02:34
  141. ! PATCH_NUMBER=24
  142. ! PATCH_DATE=20-nov-91
  143. --- 1,3 ----
  144. ! # @(#)patchnum    1.13 10 Dec 1991 00:03:53
  145. ! PATCH_NUMBER=25
  146. ! PATCH_DATE=09-dec-91
  147.  
  148. Prereq: 3.1.24.1
  149. Index: level
  150. ***************
  151. *** 1,2 ****
  152. ! # @(#)level    1.13 20 Nov 1991 01:02:30
  153. ! 3.1.24.1 Wed Nov 20 01:01:52 PST 1991
  154. --- 1,2 ----
  155. ! # @(#)level    1.14 10 Dec 1991 00:03:48
  156. ! 3.1.25.1 Tue Dec 10 00:03:16 PST 1991
  157.  
  158. Index: README
  159. ***************
  160. *** 56,61 ****
  161. --- 56,155 ----
  162.       delivery_mode=queued
  163.   
  164.   
  165. + CHANGES IN THE 3.1.25 RELEASE
  166. + Release 3.1.25 is primarily a bug fix patch release to smail3.1.24.
  167. + It includes some portability enhancements, but no new features.  This
  168. + release contains the following changes and bug fixes:
  169. + 1.  A bug in the mailbox locking code was introduced in 3.1.23 that
  170. +     caused basic non-POSIX System V systems to dereference an
  171. +     uninitialized pointer, which often caused core dumps.
  172. + 2.  The installation scripts will now use an rm/mv sequence as a
  173. +     backup if mv doesn't work.  HP-UX 7.0 will fail to rename a file
  174. +     if the destination is being executed (even if the destination is
  175. +     not the only link).  However, an rm will work, so an rm/mv
  176. +     sequence should fix this problem.
  177. + 3.  HP-UX 8.0 is now listed as POSIX compliant.
  178. + 4.  A few of the longer identifiers in src/default.c were too long for
  179. +     some SCO C compilers.  The troublesome identifiers were shortened.
  180. + 5.  The YP support added into mkdbm in release 3.1.23 used
  181. +     gethostname, explicitly, which many systems do not support.  The
  182. +     command can now be compiled (like most of smail) to use
  183. +     gethostname, uname, or an ASCII file containing a hostname.
  184. + 6.  The LOCAL_MAIL_FILE variable can now be set in the EDITME file
  185. +     (although it is not described).
  186. + 7.  The UUWHO_USE_DBM EDITME flag didn't work, because it was not
  187. +     being propogated to the defs.h file.  It also didn't work if NDBM
  188. +     was specified in HAVE, but DBM was not, even though compatibility
  189. +     code was added in releaes 3.1.23 to make this work.  Finally,
  190. +     mkuuwho didn't work with DBM because of a mixup in some shell case
  191. +     patterns.
  192. + 8.  Added an official patch to pathalias that was apparently posted to
  193. +     the net some time ago, but which I didn't know about.
  194. + 9.  appendfile.c will no longer include <sys/time.h> in an attempt to
  195. +     get the utimbuf structure.  Your system should define utimbuf in
  196. +     either <utime.h>, or <sys/types.h>, or should define
  197. +     DECLARE_UTIMBUF to get smail to define utimbuf itself.
  198. + 10. Smail will now call siginterrupt for 4.3BSD, in an attempt to have
  199. +     signals interrupt the accept() system call.
  200. + 11. The bind router can now use the res_search function rather than
  201. +     the older res_mkquery.  This apparently works better, at least
  202. +     under recent SunOS releases.
  203. + 12. The samples/bind/routers file incorrectly mentioned the defname
  204. +     attribute when it should have mentioned defnames.
  205. + 13. Made an attempt at fixing the dbmclose macro in dbm_compat.h so
  206. +     that it didn't cause compiler warnings on machines that don't
  207. +     handle (void)0 so well with the ?: operator.
  208. + 14. The compatbility getopt() function is not compiled if libc has
  209. +     one, to avoid differences with any declared function prototypes.
  210. + 15. The bind router will now declare h_errno, rather than expecting
  211. +     the <netdb.h> header file to define it.
  212. + 16. Some inconsistent uses of a sometimes allocated pointer were fixed
  213. +     in unsharmap.c that may have caused core dumps on some machines.
  214. + 17. HP-UX 7.0 cannot handle a newline within a pattern in a shell case
  215. +     statement.  Thus, just for HP-UX 7.0 smail will use a much slower
  216. +     operation (involving an echo to "wc -l") in conf/lib/mkdefs.sh,
  217. +     when building defs.sed files.  Variables which contain newlines
  218. +     are weeded out when generating defs.sed files, to ensure that the
  219. +     files are parsable.
  220. + NOTE ABOUT PATCH TO BIND
  221. + The patch to bind causes smail to use the res_search function. This
  222. + supposedly interacts with the "defnames" attribute correctly on some
  223. + versions of the resolver library.  However, it doesn't work correctly
  224. + in my version (standard SVR4.0 version 3 from AT&T), so beware.  If
  225. + this doesn't work, try adding OBSOLETE_RESOLVER to MISC_DEFINES in the
  226. + EDITME file.
  227. + ACKNOWLEDGEMENTS FOR PATCH 25
  228. + This patch was made possible with the help of the following people
  229. + that I can recall: Bell Aten, Alan Barrett, Neal D. Becker,
  230. + Uwe Doering, David J. Fiander, Bill Heiser, Guenter Kreis,
  231. + Simon Leinen, Jan-Piet Mens, Klaus Elmquist Nielsen, Jim O'Connor,
  232. + Chip Salzenberg, Roy Smith, and Tony Sumrall.
  233.   CHANGES IN THE 3.1.24 RELEASE
  234.   
  235.   Release 3.1.24 is an emergency patch release to smail3.1.23.  This
  236. ***************
  237. *** 419,425 ****
  238.   are interested, please send mail.
  239.   
  240.   
  241. ! ACKNOWLEDGEMENTS FOR THIS PATCH
  242.   
  243.   The comprehensive nature of this patch was made possible by the help
  244.   of many people.  Here is a partial list: Bill Aten, Larry Auton, Alan
  245. --- 513,519 ----
  246.   are interested, please send mail.
  247.   
  248.   
  249. ! ACKNOWLEDGEMENTS FOR PATCH 23
  250.   
  251.   The comprehensive nature of this patch was made possible by the help
  252.   of many people.  Here is a partial list: Bill Aten, Larry Auton, Alan
  253.  
  254. Index: conf/EDITME-dist
  255. ***************
  256. *** 1,4 ****
  257. ! # @(#)conf/EDITME-dist    1.23 15 Nov 1991 16:27:06
  258.   #
  259.   # EDITME - edit me to perform high level configuration of smail
  260.   #
  261. --- 1,4 ----
  262. ! # @(#)conf/EDITME-dist    1.27 10 Dec 1991 01:09:30
  263.   #
  264.   # EDITME - edit me to perform high level configuration of smail
  265.   #
  266. ***************
  267. *** 83,89 ****
  268.   #
  269.   # If you wish to use the GNU dbm library, then add -lgdbm to LIBS
  270.   # (perhaps with a -L to indicate the directory containing gdbm),
  271. ! # and then add HAVE_NDBM to the HAVE variable.
  272.   
  273.   #LIBS=-lgdbm                # use the GNU dbm library
  274.   #LIBS="-L/usr/local/lib -lgdbm"        # if gdbm is in /usr/local/lib
  275. --- 83,89 ----
  276.   #
  277.   # If you wish to use the GNU dbm library, then add -lgdbm to LIBS
  278.   # (perhaps with a -L to indicate the directory containing gdbm),
  279. ! # and then add NDBM to the HAVE variable.
  280.   
  281.   #LIBS=-lgdbm                # use the GNU dbm library
  282.   #LIBS="-L/usr/local/lib -lgdbm"        # if gdbm is in /usr/local/lib
  283. ***************
  284. *** 216,222 ****
  285.   # If LMAIL is defined below and the specified file does not exist,
  286.   # then the binmail makefile install rule will attempt to move
  287.   # /bin/mail to LMAIL and then copy binmail into /bin/mail.  If LMAIL
  288. ! # is defined and the file LMAIL does not exist, then the binmail
  289.   # makefile will refuse to install binmail.
  290.   #
  291.   # If LMAIL is not defined then /bin/mail is not touched.
  292. --- 216,222 ----
  293.   # If LMAIL is defined below and the specified file does not exist,
  294.   # then the binmail makefile install rule will attempt to move
  295.   # /bin/mail to LMAIL and then copy binmail into /bin/mail.  If LMAIL
  296. ! # is defined and the file LMAIL does exist, then the binmail
  297.   # makefile will refuse to install binmail.
  298.   #
  299.   # If LMAIL is not defined then /bin/mail is not touched.
  300. ***************
  301. *** 268,277 ****
  302. --- 268,290 ----
  303.   # reason to use the System V forwarding convention, it is sufficient
  304.   # to disable it.  To disable the System V forwarding convention, add
  305.   # NO_FORWARDTO_FILE to MISC_DEFINES.
  306. + #
  307. + # IMPORTANT FOR USERS OF OLD BIND RELEASES
  308. + #
  309. + # The bind resolver can make use of features in newer releases of
  310. + # BIND (named).  In particular, it will use the res_search function,
  311. + # rather than older res_mkquery function.  If you do not have the
  312. + # new BIND release (e.g., res_search is listed as an undefined
  313. + # variable when you link smail), then add OBSOLETE_RESOLVER to
  314. + # MISC_DEFINES.  Also, the res_search function does not appear to
  315. + # interract correctly with the 'defnames' attribute to the bind
  316. + # driver, on some versions of the resolv library, so beware.  If bind
  317. + # doesn't work for you, try defining OBSOLETE_RESOLVER.
  318.   
  319.   #MISC_DEFINES=ISC_SOCKET_TIME_BUG
  320.   #MISC_DEFINES=NO_FORWARDTO_FILE        # recommended for BSD systems
  321.   #MISC_DEFINES=ISC_SOCKET_TIME_BUG:NO_FORWARDTO_FILE
  322. + #MISC_DEFINES=OBSOLETE_RESOLVER
  323.   
  324.   
  325.   # HAVE - miscellaneous supported features
  326.  
  327. Index: conf/lib/inst.sh
  328. ***************
  329. *** 1,6 ****
  330.   :
  331.   #!/bin/sh
  332. ! # @(#)conf/lib/inst.sh    1.4 23 Jul 1991 22:23:52
  333.   # Install a file under a list of names.
  334.   #
  335.   # usage: sh inst.sh [-lsr] [-u user] [-g group] [-m mode] [-d dir] src [dst...]
  336. --- 1,6 ----
  337.   :
  338.   #!/bin/sh
  339. ! # @(#)conf/lib/inst.sh    1.5 09 Dec 1991 23:10:35
  340.   # Install a file under a list of names.
  341.   #
  342.   # usage: sh inst.sh [-lsr] [-u user] [-g group] [-m mode] [-d dir] src [dst...]
  343. ***************
  344. *** 130,138 ****
  345.       if $dbg mv "$new" "$dst" < /dev/null; then
  346.           echo "$srcfile installed as $dst"
  347.       else
  348. !         $dbg rm -f "$new" "$old"
  349. !         echo "inst: failed to install $srcfile as $dst" 1>&2
  350. !         exit 1
  351.       fi
  352.   
  353.       # if -r flag specified, remove the .O file
  354. --- 130,147 ----
  355.       if $dbg mv "$new" "$dst" < /dev/null; then
  356.           echo "$srcfile installed as $dst"
  357.       else
  358. !         # some systems (HP-UX 7.0) can't do a mv if the
  359. !         # destination is an executable, however, an rm/mv
  360. !         # sequence may work
  361. !         echo "inst: try removing destination and trying again" 1>&2
  362. !         if $dbg rm -f "$dst" &&
  363. !            $dbg mv "$new" "$dst" < /dev/null; then
  364. !             echo "inst: rm/mv succeeded: $srcfile installed as $dst" 1>&2
  365. !         else
  366. !             $dbg rm -f "$new" "$old"
  367. !             echo "inst: failed to install $srcfile as $dst" 1>&2
  368. !             exit 1
  369. !         fi
  370.       fi
  371.   
  372.       # if -r flag specified, remove the .O file
  373. ***************
  374. *** 188,202 ****
  375.       ?*)    # link to previous
  376.           $dbg rm -f "$new" "$old"
  377.           $dbg ln "$dst" "$old" 2> /dev/null
  378. !         if $dbg ln "$lastdst" "$new" 2> /dev/null &&
  379. !            $dbg mv "$new" "$dst" < /dev/null
  380.           then
  381. !             echo "$lastdst linked to $dst"
  382. !             case "$rm_old" in
  383. !             ?*)    rm -f "$old";;
  384. !             esac
  385. !             lastdst="$dst"
  386. !             continue
  387.           fi;;
  388.       *)    # copy
  389.           $dbg rm -f "$new" "$old"
  390. --- 197,229 ----
  391.       ?*)    # link to previous
  392.           $dbg rm -f "$new" "$old"
  393.           $dbg ln "$dst" "$old" 2> /dev/null
  394. !         if $dbg ln "$lastdst" "$new" 2> /dev/null
  395.           then
  396. !             if $dbg mv "$new" "$dst" < /dev/null
  397. !             then
  398. !                 echo "$lastdst linked to $dst"
  399. !                 case "$rm_old" in
  400. !                 ?*)    rm -f "$old";;
  401. !                 esac
  402. !                 lastdst="$dst"
  403. !                 continue
  404. !             else
  405. !                 # some systems (HP-UX 7.0) can't do a mv
  406. !                 # if the destination is an executable,
  407. !                 # however, an rm/mv sequence may work
  408. !                 echo "inst: try removing destination and trying again" 1>&2
  409. !                 if $dbg rm -f "$dst" &&
  410. !                    $dbg mv "$new" "$dst" < /dev/null; then
  411. !                     echo "inst: rm/mv succeeded: $lastdst linked to $dst" 1>&2
  412. !                     lastdst="$dst"
  413. !                     continue
  414. !                 else
  415. !                     $dbg rm -f "$new" "$old"
  416. !                     echo "inst: failed to install $srcfile as $dst" 1>&2
  417. !                     err=1
  418. !                     continue
  419. !                 fi
  420. !             fi
  421.           fi;;
  422.       *)    # copy
  423.           $dbg rm -f "$new" "$old"
  424. ***************
  425. *** 256,265 ****
  426.       if $dbg mv "$new" "$dst" < /dev/null; then
  427.           echo "$srcfile installed as $dst"
  428.       else
  429. !         $dbg rm -f "$new" "$old"
  430. !         echo "inst: failed to install $srcfile as $dst" 1>&2
  431. !         err=1
  432. !         continue
  433.       fi
  434.       lastdst="$dst"
  435.   
  436. --- 283,301 ----
  437.       if $dbg mv "$new" "$dst" < /dev/null; then
  438.           echo "$srcfile installed as $dst"
  439.       else
  440. !         # some systems (HP-UX 7.0) can't do a mv if the
  441. !         # destination is an executable, however, an rm/mv
  442. !         # sequence may work
  443. !         echo "inst: try removing destination and trying again" 1>&2
  444. !         if $dbg rm -f "$dst" &&
  445. !            $dbg mv "$new" "$dst" < /dev/null; then
  446. !             echo "inst: rm/mv succeeded: $srcfile installed as $dst" 1>&2
  447. !         else
  448. !             $dbg rm -f "$new" "$old"
  449. !             echo "inst: failed to install $srcfile as $dst" 1>&2
  450. !             err=1
  451. !             continue
  452. !         fi
  453.       fi
  454.       lastdst="$dst"
  455.   
  456.  
  457. Index: conf/lib/instm.sh
  458. ***************
  459. *** 1,6 ****
  460.   :
  461.   #!/bin/sh
  462. ! # @(#)conf/lib/instm.sh    1.4 23 Jul 1991 22:23:56
  463.   # Install a set of files into a directory
  464.   #
  465.   # usage: sh instm.sh [-sr] [-u user] [-g group] [-m mode] dir file...
  466. --- 1,6 ----
  467.   :
  468.   #!/bin/sh
  469. ! # @(#)conf/lib/instm.sh    1.5 09 Dec 1991 23:10:39
  470.   # Install a set of files into a directory
  471.   #
  472.   # usage: sh instm.sh [-sr] [-u user] [-g group] [-m mode] dir file...
  473. ***************
  474. *** 120,129 ****
  475.       if $dbg mv "$new" "$dst" < /dev/null; then
  476.           echo "installed $file as $dst"
  477.       else
  478. !         $dbg rm -f "$new" "$old"
  479. !         echo "instm: failed to install $file as $dst" 1>&2
  480. !         err=1
  481. !         continue
  482.       fi
  483.       case "$rm_old" in
  484.       ?*)    rm -f "$old";;
  485. --- 120,138 ----
  486.       if $dbg mv "$new" "$dst" < /dev/null; then
  487.           echo "installed $file as $dst"
  488.       else
  489. !         # some systems (HP-UX 7.0) can't do a mv if the
  490. !         # destination is an executable, however, an rm/mv
  491. !         # sequence may work
  492. !         echo "inst: removing destination and trying again" 1>&2
  493. !         if $dbg rm -f "$dst" &&
  494. !            $dbg mv "$new" "$dst" < /dev/null; then
  495. !             echo "inst: rm/mv succeeded: $file installed as $dst" 1>&2
  496. !         else
  497. !             $dbg rm -f "$new" "$old"
  498. !             echo "instm: failed to install $file as $dst" 1>&2
  499. !             err=1
  500. !             continue
  501. !         fi
  502.       fi
  503.       case "$rm_old" in
  504.       ?*)    rm -f "$old";;
  505.  
  506. Index: conf/lib/mkdefs.sh
  507. ***************
  508. *** 1,5 ****
  509.   #!/bin/sh
  510. ! # @(#)conf/lib/mkdefs.sh    1.19 03 Nov 1991 04:56:30
  511.   
  512.   #    Copyright (C) 1987, 1988 Ronald S. Karr and Landon Curt Noll
  513.   # 
  514. --- 1,5 ----
  515.   #!/bin/sh
  516. ! # @(#)conf/lib/mkdefs.sh    1.22 09 Dec 1991 18:34:42
  517.   
  518.   #    Copyright (C) 1987, 1988 Ronald S. Karr and Landon Curt Noll
  519.   # 
  520. ***************
  521. *** 485,491 ****
  522.    */
  523.   
  524.   #define MAILBOX_DIR        "$MAILBOX_DIR"
  525. ! #define LOCAL_MAIL_FILE        "$MAILBOX_DIR/\${lc:user}"
  526.   #define CONSOLE            "$CONSOLE"
  527.   $LOCKING_PROTOCOL
  528.   $DECLARE_STRINGS
  529. --- 485,491 ----
  530.    */
  531.   
  532.   #define MAILBOX_DIR        "$MAILBOX_DIR"
  533. ! #define LOCAL_MAIL_FILE        "$LOCAL_MAIL_FILE"
  534.   #define CONSOLE            "$CONSOLE"
  535.   $LOCKING_PROTOCOL
  536.   $DECLARE_STRINGS
  537. ***************
  538. *** 559,564 ****
  539. --- 559,565 ----
  540.           -e 's/\([A-Z0-9_]*\)=$/#undef \1/p'
  541.   SMALL_MEMORY=$SMALL_MEMORY
  542.   USE_ASCII=$USE_ASCII
  543. + UUWHO_USE_DBM=$UUWHO_USE_DBM
  544.   EOF
  545.   
  546.   # write out the positibe boolean list variables
  547. ***************
  548. *** 615,630 ****
  549.   
  550.   # write out the simple variables.  Ignore variables with newlines or | chars
  551.   
  552. ! nl='
  553.   '
  554. ! for v in $VARS; do
  555. !     eval "
  556. !         case \"\$$v\" in
  557. !         *\$nl*|*'|'*) :;;
  558. !         *)    echo \"s|X_${v}_X|\$$v|g\";;
  559. !         esac
  560. !          "
  561. ! done
  562.   
  563.   # clear the negative boolean list variables
  564.   (IFS="$sep"; for i in $NO_HAVE; do echo "s|X_HAVE_${i}_X||g"; done)
  565. --- 616,647 ----
  566.   
  567.   # write out the simple variables.  Ignore variables with newlines or | chars
  568.   
  569. ! if [ ! -z "$CASE_NO_NEWLINES" ]; then
  570. !     # HP-UX 7.0 cannot handle newlines within a case pattern.
  571. !     # Thus, we will use wc to find newlines, instead.
  572. !     for v in $VARS; do
  573. !         eval "
  574. !             if [ \`echo \"\$$v\" | wc -l\` -eq 1 ]; then
  575. !                 case \"\$$v\" in
  576. !                 *'|'*|*'\\'*)    :;;
  577. !                 *)    echo \"s|X_${v}_X|\$$v|g\";;
  578. !                 esac
  579. !             fi
  580. !              "
  581. !     done
  582. ! else
  583. !     nl='
  584.   '
  585. !     for v in $VARS; do
  586. !         eval "
  587. !             case \"\$$v\" in
  588. !             *\$nl*|*'|'*|*'\\'*) :;;
  589. !             *)    echo \"s|X_${v}_X|\$$v|g\";;
  590. !             esac
  591. !              "
  592. !     done
  593. ! fi
  594.   
  595.   # clear the negative boolean list variables
  596.   (IFS="$sep"; for i in $NO_HAVE; do echo "s|X_HAVE_${i}_X||g"; done)
  597.  
  598. Index: conf/os/hp-ux7.0
  599. ***************
  600. *** 1,4 ****
  601. ! # @(#)conf/os/hp-ux7.0    1.2 11 Nov 1991 07:47:57
  602.   #
  603.   # hp-ux7.0 - define characteristics of Hewlet Packard's HP-UX version 7.0
  604.   
  605. --- 1,4 ----
  606. ! # @(#)conf/os/hp-ux7.0    1.3 09 Dec 1991 18:34:40
  607.   #
  608.   # hp-ux7.0 - define characteristics of Hewlet Packard's HP-UX version 7.0
  609.   
  610. ***************
  611. *** 16,18 ****
  612. --- 16,24 ----
  613.   # HAVE - what features should be used with this operating system
  614.   HAVE=BSTRING:SYS5_STRLIB:READDIR:VFPRINTF:GETOPT:DUP2:ULIMIT
  615.   HAVE=$HAVE:MKDIR:SETGROUPS:DBM:NDBM:GETHOSTNAME:BSD_NETWORKING
  616. + # HP-UX 7.0 cannot handle newlines within a case pattern, which
  617. + # mkdefs.sh normally relies on.  Set CASE_NO_NEWLINES to use an even
  618. + # more grotesque looking shell expression for ignoring EDITME conf/os
  619. + # variables that have newlines.
  620. + CASE_NO_NEWLINES=true
  621.  
  622. Index: conf/os/hp-ux8.0
  623. ***************
  624. *** 1,4 ****
  625. ! # @(#)conf/os/hp-ux8.0    1.2 11 Nov 1991 07:47:31
  626.   #
  627.   # hp-ux8.0 - define characteristics of Hewlet Packard's HP-UX version 8.0
  628.   #
  629. --- 1,4 ----
  630. ! # @(#)conf/os/hp-ux8.0    1.3 09 Dec 1991 00:07:23
  631.   #
  632.   # hp-ux8.0 - define characteristics of Hewlet Packard's HP-UX version 8.0
  633.   #
  634. ***************
  635. *** 7,13 ****
  636.   . $ROOT/conf/os/sys5.3        # this is on an System V release 3 base
  637.   
  638.   # OSNAMES - Names defining this operating system
  639. ! OSNAMES="UNIX_HPUX8_0:UNIX_HPUX8:UNIX_HPUX:$OSNAMES"
  640.   
  641.   # CC - the C compiler to use for compiling smail
  642.   CC=c89
  643. --- 7,13 ----
  644.   . $ROOT/conf/os/sys5.3        # this is on an System V release 3 base
  645.   
  646.   # OSNAMES - Names defining this operating system
  647. ! OSNAMES="UNIX_HPUX8_0:UNIX_HPUX8:UNIX_HPUX:$OSNAMES:POSIX_OS"
  648.   
  649.   # CC - the C compiler to use for compiling smail
  650.   CC=c89
  651.  
  652. Index: pd/getopt/get_opt.c
  653. ***************
  654. *** 1,5 ****
  655.   /*
  656. !  * @(#)pd/getopt/get_opt.c    1.3 03 Jun 1991 02:09:04
  657.    */
  658.   
  659.   /*
  660. --- 1,5 ----
  661.   /*
  662. !  * @(#)pd/getopt/get_opt.c    1.4 09 Dec 1991 01:57:22
  663.    */
  664.   
  665.   /*
  666. ***************
  667. *** 27,32 ****
  668. --- 27,34 ----
  669.   #include <stdio.h>
  670.   #include "defs.h"
  671.   
  672. + #ifndef HAVE_GETOPT
  673.   /*LINTLIBRARY*/
  674.   #define ERR(s, c)    if(opterr){\
  675.       extern int write();\
  676. ***************
  677. *** 88,90 ****
  678. --- 90,94 ----
  679.       }
  680.       return(c);
  681.   }
  682. + #endif /* not HAVE_GETOPT */
  683.  
  684. Index: pd/pathalias/config.h
  685. ***************
  686. *** 1,4 ****
  687. ! /* Smail SCCS ID: @(#)pd/pathalias/config.h    1.6 %G 00:43:21 */
  688.   /* pathalias -- by steve bellovin, as told to peter honeyman */
  689.   
  690.   /**************************************************************************
  691. --- 1,4 ----
  692. ! /* Smail SCCS ID: @(#)pd/pathalias/config.h    1.7 %G 01:08:05 */
  693.   /* pathalias -- by steve bellovin, as told to peter honeyman */
  694.   
  695.   /**************************************************************************
  696. ***************
  697. *** 68,74 ****
  698.    * core dumps (or panics!), comment out the following manifest,
  699.    * and use the inferior C library malloc/free.
  700.    */
  701. ! #if !defined(SMAIL_3) || !defined(NO_PALIAS_MYMALLOC)
  702.   #define MYMALLOC    /**/
  703.   #endif
  704.   
  705. --- 68,74 ----
  706.    * core dumps (or panics!), comment out the following manifest,
  707.    * and use the inferior C library malloc/free.
  708.    */
  709. ! #if !defined(SMAIL_3) && !defined(NO_PALIAS_MYMALLOC)
  710.   #define MYMALLOC    /**/
  711.   #endif
  712.   
  713.  
  714. Index: pd/pathalias/mapaux.c
  715. ***************
  716. *** 1,4 ****
  717. ! /* Smail SCCS ID: @(#)pd/pathalias/mapaux.c    1.5 %G 00:43:32 */
  718.   /* pathalias -- by steve bellovin, as told to peter honeyman */
  719.   #ifndef lint
  720.   static char    *sccsid = "@(#)mapaux.c    9.4 89/03/01";
  721. --- 1,4 ----
  722. ! /* Smail SCCS ID: @(#)pd/pathalias/mapaux.c    1.6 %G 01:08:17 */
  723.   /* pathalias -- by steve bellovin, as told to peter honeyman */
  724.   #ifndef lint
  725.   static char    *sccsid = "@(#)mapaux.c    9.4 89/03/01";
  726. ***************
  727. *** 370,375 ****
  728. --- 370,376 ----
  729.       for (l = n->n_link; l != 0; l = l->l_next) {
  730.           /* avoid vestigial descendants */
  731.           if ((l->l_to->n_flag & MAPPED) != 0
  732. +          || (l->l_flag & LTERMINAL) != 0
  733.            || ALTEREGO(l->l_to, parent))
  734.               continue;
  735.   #ifdef DEBUG
  736.  
  737. Index: samples/bind/routers
  738. ***************
  739. *** 1,4 ****
  740. ! # @(#)samples/bind/routers    1.1 20 Oct 1991 17:38:32
  741.   
  742.   # This file can be used on systems which are on the Internet and which
  743.   # also have uucp connections.  This can be used with systems that
  744. --- 1,4 ----
  745. ! # @(#)samples/bind/routers    1.2 09 Dec 1991 01:28:57
  746.   
  747.   # This file can be used on systems which are on the Internet and which
  748.   # also have uucp connections.  This can be used with systems that
  749. ***************
  750. *** 27,33 ****
  751.       transport = smtp;        # deliver using SMTP transport
  752.   
  753.       local_mx_okay,            # MX to local host falls through
  754. !     -defname            # don't append default domain name
  755.   
  756.   # paths - route using a paths file, like that produced by the pathalias program
  757.   paths:    driver = pathalias,        # general-use paths router
  758. --- 27,33 ----
  759.       transport = smtp;        # deliver using SMTP transport
  760.   
  761.       local_mx_okay,            # MX to local host falls through
  762. !     -defnames            # don't append default domain name
  763.   
  764.   # paths - route using a paths file, like that produced by the pathalias program
  765.   paths:    driver = pathalias,        # general-use paths router
  766.  
  767. Index: src/config.h
  768. ***************
  769. *** 1,4 ****
  770. ! /* @(#)src/config.h    1.10 27 Oct 1991 19:10:10 */
  771.   
  772.   /*
  773.    *    Copyright (C) 1987, 1988 Ronald S. Karr and Landon Curt Noll
  774. --- 1,4 ----
  775. ! /* @(#)src/config.h    1.11 09 Dec 1991 00:42:21 */
  776.   
  777.   /*
  778.    *    Copyright (C) 1987, 1988 Ronald S. Karr and Landon Curt Noll
  779. ***************
  780. *** 968,977 ****
  781.    * for users.  This maintains compatibility with this system.
  782.    */
  783.   #if    !defined(FORWARDTO_FILE) && !defined(NO_FORWARDTO_FILE)
  784. ! # ifdef    UNIX_SYS5
  785. ! #  define FORWARDTO_FILE "/usr/mail/${lc:user}"
  786.   # else
  787. ! #  define FORWARDTO_FILE "/usr/spool/mail/${lc:user}"
  788.   # endif
  789.   #endif
  790.   
  791. --- 968,981 ----
  792.    * for users.  This maintains compatibility with this system.
  793.    */
  794.   #if    !defined(FORWARDTO_FILE) && !defined(NO_FORWARDTO_FILE)
  795. ! # ifdef LOCAL_MAIL_FILE
  796. ! #  define FORWARDTO_FILE LOCAL_MAIL_FILE
  797.   # else
  798. ! #  ifdef UNIX_SYS5
  799. ! #   define FORWARDTO_FILE "/usr/mail/${lc:user}"
  800. ! #  else
  801. ! #   define FORWARDTO_FILE "/usr/spool/mail/${lc:user}"
  802. ! #  endif
  803.   # endif
  804.   #endif
  805.   
  806.  
  807. Index: src/default.c
  808. ***************
  809. *** 1,4 ****
  810. ! /* @(#)src/default.c    1.7 03 Nov 1991 03:59:41 */
  811.   
  812.   /*
  813.    *    Copyright (C) 1987, 1988 Ronald S. Karr and Landon Curt Noll
  814. --- 1,4 ----
  815. ! /* @(#)src/default.c    1.8 09 Dec 1991 00:29:05 */
  816.   
  817.   /*
  818.    *    Copyright (C) 1987, 1988 Ronald S. Karr and Landon Curt Noll
  819. ***************
  820. *** 914,920 ****
  821.    *
  822.    * The message is transferred in local format.
  823.    */
  824. ! static struct pipe_private local_demand_transport_priv = {
  825.       DEMAND_UUX_COMMAND,            /* demand uux to remote rmail */
  826.       /* to run uux as other than the nobody user, put the login name here */
  827.       NULL,                /* execute the program as nobody */
  828. --- 914,920 ----
  829.    *
  830.    * The message is transferred in local format.
  831.    */
  832. ! static struct pipe_private ldemand_transport_priv = {
  833.       DEMAND_UUX_COMMAND,            /* demand uux to remote rmail */
  834.       /* to run uux as other than the nobody user, put the login name here */
  835.       NULL,                /* execute the program as nobody */
  836. ***************
  837. *** 922,928 ****
  838.       0022,                /* umask for child process */
  839.   };
  840.   
  841. ! static struct transport local_demand_transport = {
  842.       "local_demand",            /* demand transport over uux */
  843.       "pipe",                /* uses pipe transport driver */
  844.       SUCC,                /* point to next transport */
  845. --- 922,928 ----
  846.       0022,                /* umask for child process */
  847.   };
  848.   
  849. ! static struct transport ldemand_transport = {
  850.       "local_demand",            /* demand transport over uux */
  851.       "pipe",                /* uses pipe transport driver */
  852.       SUCC,                /* point to next transport */
  853. ***************
  854. *** 933,942 ****
  855.       NULL, NULL, NULL,            /* hdrremove, hdrinsert, hdrappend */
  856.       NULL,                /* no shadow transport */
  857.       NULL,                /* no recourse on failures */
  858. !     (char *)&local_demand_transport_priv, /* demand private configuration */
  859.   };
  860.   #undef SUCC
  861. ! #define SUCC (&local_demand_transport)    /* setup for forward link */
  862.   
  863.   
  864.   /*
  865. --- 933,942 ----
  866.       NULL, NULL, NULL,            /* hdrremove, hdrinsert, hdrappend */
  867.       NULL,                /* no shadow transport */
  868.       NULL,                /* no recourse on failures */
  869. !     (char *)&ldemand_transport_priv,    /* demand private configuration */
  870.   };
  871.   #undef SUCC
  872. ! #define SUCC (&ldemand_transport)    /* setup for forward link */
  873.   
  874.   
  875.   /*
  876. ***************
  877. *** 1050,1056 ****
  878.    *
  879.    * The message is transferred in local format.
  880.    */
  881. ! static struct pipe_private local_demand_uusmtp_transport_priv = {
  882.       DEMAND_UUSMTP_COMMAND,        /* demand uux to remote rsmtp */
  883.       /* to run uux as other than the nobody user, put the login name here */
  884.       NULL,                /* execute the program as nobody */
  885. --- 1050,1056 ----
  886.    *
  887.    * The message is transferred in local format.
  888.    */
  889. ! static struct pipe_private ldemand_uusmtp_transport_priv = {
  890.       DEMAND_UUSMTP_COMMAND,        /* demand uux to remote rsmtp */
  891.       /* to run uux as other than the nobody user, put the login name here */
  892.       NULL,                /* execute the program as nobody */
  893. ***************
  894. *** 1058,1064 ****
  895.       0022,                /* umask for child process */
  896.   };
  897.   
  898. ! static struct transport local_demand_uusmtp_transport = {
  899.       "local_demand_uusmtp",        /* demand transport over uux */
  900.       "pipe",                /* uses pipe transport driver */
  901.       SUCC,                /* point to next transport */
  902. --- 1058,1064 ----
  903.       0022,                /* umask for child process */
  904.   };
  905.   
  906. ! static struct transport ldemand_uusmtp_transport = {
  907.       "local_demand_uusmtp",        /* demand transport over uux */
  908.       "pipe",                /* uses pipe transport driver */
  909.       SUCC,                /* point to next transport */
  910. ***************
  911. *** 1069,1079 ****
  912.       NULL, NULL, NULL,            /* hdrremove, hdrinsert, hdrappend */
  913.       NULL,                /* no shadow transport */
  914.       NULL,                /* no recourse on failures */
  915. !     (char *)&local_demand_uusmtp_transport_priv,
  916.                           /* demand private configuration */
  917.   };
  918.   #undef SUCC
  919. ! #define SUCC (&local_demand_uusmtp_transport) /* setup for forward link */
  920.   
  921.   
  922.   /*
  923. --- 1069,1079 ----
  924.       NULL, NULL, NULL,            /* hdrremove, hdrinsert, hdrappend */
  925.       NULL,                /* no shadow transport */
  926.       NULL,                /* no recourse on failures */
  927. !     (char *)&ldemand_uusmtp_transport_priv,
  928.                           /* demand private configuration */
  929.   };
  930.   #undef SUCC
  931. ! #define SUCC (&ldemand_uusmtp_transport) /* setup for forward link */
  932.   
  933.   
  934.   /*
  935. ***************
  936. *** 1119,1125 ****
  937.    *
  938.    * The message is transferred in internet format.
  939.    */
  940. ! static struct pipe_private inet_demand_uusmtp_transport_priv = {
  941.       DEMAND_UUSMTP_COMMAND,        /* demand uux to remote rsmtp */
  942.       /* to run uux as other than the nobody user, put the login name here */
  943.       NULL,                /* execute the program as nobody */
  944. --- 1119,1125 ----
  945.    *
  946.    * The message is transferred in internet format.
  947.    */
  948. ! static struct pipe_private idemand_uusmtp_transport_priv = {
  949.       DEMAND_UUSMTP_COMMAND,        /* demand uux to remote rsmtp */
  950.       /* to run uux as other than the nobody user, put the login name here */
  951.       NULL,                /* execute the program as nobody */
  952. ***************
  953. *** 1127,1133 ****
  954.       0022,                /* umask for child process */
  955.   };
  956.   
  957. ! static struct transport inet_demand_uusmtp_transport = {
  958.       "inet_demand_uusmtp",        /* demand transport over uux */
  959.       "pipe",                /* uses pipe transport driver */
  960.       SUCC,                /* point to next transport */
  961. --- 1127,1133 ----
  962.       0022,                /* umask for child process */
  963.   };
  964.   
  965. ! static struct transport idemand_uusmtp_transport = {
  966.       "inet_demand_uusmtp",        /* demand transport over uux */
  967.       "pipe",                /* uses pipe transport driver */
  968.       SUCC,                /* point to next transport */
  969. ***************
  970. *** 1138,1148 ****
  971.       NULL, NULL, NULL,            /* hdrremove, hdrinsert, hdrappend */
  972.       NULL,                /* no shadow transport */
  973.       NULL,                /* no recourse on failures */
  974. !     (char *)&inet_demand_uusmtp_transport_priv,
  975.                           /* demand private configuration */
  976.   };
  977.   #undef SUCC
  978. ! #define SUCC (&inet_demand_uusmtp_transport) /* setup for forward link */
  979.   
  980.   
  981.   #ifdef USE_SMTP_TRANSPORT
  982. --- 1138,1148 ----
  983.       NULL, NULL, NULL,            /* hdrremove, hdrinsert, hdrappend */
  984.       NULL,                /* no shadow transport */
  985.       NULL,                /* no recourse on failures */
  986. !     (char *)&idemand_uusmtp_transport_priv,
  987.                           /* demand private configuration */
  988.   };
  989.   #undef SUCC
  990. ! #define SUCC (&idemand_uusmtp_transport) /* setup for forward link */
  991.   
  992.   
  993.   #ifdef USE_SMTP_TRANSPORT
  994.  
  995. Index: src/log.c
  996. ***************
  997. *** 1,4 ****
  998. ! /* @(#)src/log.c    1.4 21 Oct 1991 01:21:41 */
  999.   
  1000.   /*
  1001.    *    Copyright (C) 1987, 1988 Ronald S. Karr and Landon Curt Noll
  1002. --- 1,4 ----
  1003. ! /* @(#)src/log.c    1.5 09 Dec 1991 00:48:33 */
  1004.   
  1005.   /*
  1006.    *    Copyright (C) 1987, 1988 Ronald S. Karr and Landon Curt Noll
  1007. ***************
  1008. *** 171,177 ****
  1009.       --slash;
  1010.       if (slash == fn)
  1011.       return;            /* root directory */
  1012. !     dr = xmalloc(slash - fn);
  1013.       (void) memcpy(dr, fn, slash - fn);
  1014.       dr[slash - fn] = '\0';
  1015.   
  1016. --- 171,177 ----
  1017.       --slash;
  1018.       if (slash == fn)
  1019.       return;            /* root directory */
  1020. !     dr = xmalloc(slash - fn + 1);
  1021.       (void) memcpy(dr, fn, slash - fn);
  1022.       dr[slash - fn] = '\0';
  1023.   
  1024.  
  1025. Index: src/modes.c
  1026. ***************
  1027. *** 1,4 ****
  1028. ! /* @(#)src/modes.c    1.12 15 Nov 1991 16:33:16 */
  1029.   
  1030.   /*
  1031.    *    Copyright (C) 1987, 1988 Ronald S. Karr and Landon Curt Noll
  1032. --- 1,4 ----
  1033. ! /* @(#)src/modes.c    1.13 09 Dec 1991 01:15:38 */
  1034.   
  1035.   /*
  1036.    *    Copyright (C) 1987, 1988 Ronald S. Karr and Landon Curt Noll
  1037. ***************
  1038. *** 834,839 ****
  1039. --- 834,846 ----
  1040.       /* set the alarm for wakeup time */
  1041.       got_sigalrm = FALSE;
  1042.       if (process_queue && queue_interval > 0) {
  1043. + #if defined(UNIX_BSD4_3) || defined(USE_SIGINTERRUPT)
  1044. +     /*
  1045. +      * We need to interrupt the accept, so ask for interrupted
  1046. +      * system calls from SIGALRMs.
  1047. +      */
  1048. +     siginterrupt(SIGALRM, 1);
  1049. + #endif
  1050.       (void) signal(SIGALRM, daemon_sigalrm);
  1051.       (void) alarm(queue_interval);
  1052.       }
  1053.  
  1054. Index: src/routers/bind.c
  1055. ***************
  1056. *** 1,4 ****
  1057. ! /* @(#)src/routers/bind.c    1.17 10 Nov 1991 06:19:35 */
  1058.   
  1059.   /*
  1060.    *    Copyright (C) 1987, 1988 Ronald S. Karr and Landon Curt Noll
  1061. --- 1,4 ----
  1062. ! /* @(#)src/routers/bind.c    1.20 10 Dec 1991 01:24:15 */
  1063.   
  1064.   /*
  1065.    *    Copyright (C) 1987, 1988 Ronald S. Karr and Landon Curt Noll
  1066. ***************
  1067. *** 170,175 ****
  1068. --- 170,183 ----
  1069.       int arcount;            /* count of additional records */
  1070.   };
  1071.   
  1072. + /*
  1073. +  * import h_errno; many systems don't define it in <netdb.h>
  1074. +  */
  1075. + #ifndef OBSOLETE_RESOLVER
  1076. + extern int h_errno;
  1077. + #endif
  1078.   /* functions local to this file */
  1079.   
  1080.   #ifdef ANSI_C
  1081. ***************
  1082. *** 338,347 ****
  1083.        */
  1084.   
  1085.   #ifdef RES_DEFNAMES
  1086.       if (rp->flags & BIND_DEFNAMES && strchr(addr->target, '.') == NULL) {
  1087. !     _res.options |= RES_DEFNAMES;
  1088.       } else {
  1089. !     _res.options &= ~RES_DEFNAMES;
  1090.       }
  1091.   #endif
  1092.       target = strip_dots(addr->target);
  1093. --- 346,358 ----
  1094.        */
  1095.   
  1096.   #ifdef RES_DEFNAMES
  1097. + # ifndef RES_DNSRCH
  1098. + # define RES_DNSRCH    0
  1099. + # endif
  1100.       if (rp->flags & BIND_DEFNAMES && strchr(addr->target, '.') == NULL) {
  1101. !     _res.options |= RES_DEFNAMES|RES_DNSRCH;
  1102.       } else {
  1103. !     _res.options &= ~(RES_DEFNAMES|RES_DNSRCH);
  1104.       }
  1105.   #endif
  1106.       target = strip_dots(addr->target);
  1107. ***************
  1108. *** 715,724 ****
  1109. --- 726,738 ----
  1110.       int *pack_size;            /* store answer packet size here */
  1111.       char **error;            /* store error message here */
  1112.   {
  1113. + #ifdef OBSOLETE_RESOLVER
  1114.       char msgbuf[MAXPACKET];
  1115. + #endif
  1116.       int msglen;
  1117.       int anslen;
  1118.   
  1119. + #ifdef OBSOLETE_RESOLVER
  1120.       msglen = res_mkquery(QUERY, qname, C_IN, qtype, (char *)NULL, 0,
  1121.                (struct rrec *)NULL, msgbuf, MAXPACKET);
  1122.   
  1123. ***************
  1124. *** 726,731 ****
  1125. --- 740,767 ----
  1126.       if (anslen < 0) {
  1127.       return FILE_NOMATCH;
  1128.       }
  1129. + #else /* not OBSOLETE_RESOLVER */
  1130. +     anslen = res_search(qname, C_IN, qtype, answer, MAXPACKET);
  1131. +     if (anslen < 0) {
  1132. +     switch (h_errno) {
  1133. +     case NO_DATA:
  1134. +     case HOST_NOT_FOUND:
  1135. +         return DB_NOMATCH;
  1136. +     case TRY_AGAIN:
  1137. +         *error = "Nameserver: Server failure";
  1138. +         return DB_AGAIN;
  1139. +     case NO_RECOVERY:
  1140. +         *error = "Irrecoverable nameserver error";
  1141. +         return FILE_NOMATCH;
  1142. +     default:
  1143. +         *error = "Unknown nameserver error";
  1144. +         return FILE_NOMATCH;
  1145. +     }
  1146. +     }
  1147. + #endif /* not OBSOLETE_RESOLVER */
  1148.       *pack_size = anslen;
  1149.   
  1150.       answer->qdcount = ntohs(answer->qdcount);
  1151. ***************
  1152. *** 737,743 ****
  1153.   
  1154.       case NOERROR:
  1155.       return DB_SUCCEED;
  1156.       case FORMERR:
  1157.       *error = "Nameserver: Format error in packet";
  1158.       return DB_FAIL;
  1159. --- 773,779 ----
  1160.   
  1161.       case NOERROR:
  1162.       return DB_SUCCEED;
  1163. ! #ifdef OBSOLETE_RESOLVER
  1164.       case FORMERR:
  1165.       *error = "Nameserver: Format error in packet";
  1166.       return DB_FAIL;
  1167. ***************
  1168. *** 756,762 ****
  1169.       case REFUSED:
  1170.       *error = "Nameserver: Query refused";
  1171.       return FILE_AGAIN;
  1172.       default:
  1173.       *error = "Nameserver: Unknown response code";
  1174.       return DB_FAIL;
  1175. --- 792,798 ----
  1176.       case REFUSED:
  1177.       *error = "Nameserver: Query refused";
  1178.       return FILE_AGAIN;
  1179. ! #endif /* OBSOLETE_RESOLVER */
  1180.       default:
  1181.       *error = "Nameserver: Unknown response code";
  1182.       return DB_FAIL;
  1183.  
  1184. Index: src/sysdep.c
  1185. ***************
  1186. *** 1,4 ****
  1187. ! /* @(#)src/sysdep.c    1.15 20 Nov 1991 00:57:50 */
  1188.   
  1189.   /*
  1190.    *    Copyright (C) 1987, 1988 Ronald S. Karr and Landon Curt Noll
  1191. --- 1,4 ----
  1192. ! /* @(#)src/sysdep.c    1.16 09 Dec 1991 00:33:00 */
  1193.   
  1194.   /*
  1195.    *    Copyright (C) 1987, 1988 Ronald S. Karr and Landon Curt Noll
  1196. ***************
  1197. *** 848,854 ****
  1198.       char **plfn;
  1199.   {
  1200.       char *base;
  1201. -     char *p;
  1202.   
  1203.       if (fn[0] != '/') {
  1204.       /*
  1205. --- 848,853 ----
  1206. ***************
  1207. *** 885,890 ****
  1208. --- 884,890 ----
  1209.       {
  1210.       int no_trunc_flag;
  1211.       int name_max;
  1212. +     char *p;
  1213.   
  1214.       if ((int)strlen(base) > _POSIX_NAME_MAX - 2) {
  1215.           char *dir;
  1216. ***************
  1217. *** 918,924 ****
  1218.   #if    !defined(UNIX_BSD) && !defined(UNIX_XENIX)
  1219.   
  1220.       /* allow at least enough room for a trailing .l */
  1221. !     if (strlen(p) > DIRSIZ - 2) {
  1222.       /*
  1223.        * always succeed
  1224.        */
  1225. --- 918,924 ----
  1226.   #if    !defined(UNIX_BSD) && !defined(UNIX_XENIX)
  1227.   
  1228.       /* allow at least enough room for a trailing .l */
  1229. !     if (strlen(base) > DIRSIZ - 2) {
  1230.       /*
  1231.        * always succeed
  1232.        */
  1233.  
  1234. Index: src/transports/appendfile.c
  1235. ***************
  1236. *** 1,4 ****
  1237. ! /* @(#)src/transports/appendfile.c    1.12 11 Nov 1991 05:48:45 */
  1238.   
  1239.   /*
  1240.    *    Copyright (C) 1987, 1988 Ronald S. Karr and Landon Curt Noll
  1241. --- 1,4 ----
  1242. ! /* @(#)src/transports/appendfile.c    1.13 09 Dec 1991 00:50:46 */
  1243.   
  1244.   /*
  1245.    *    Copyright (C) 1987, 1988 Ronald S. Karr and Landon Curt Noll
  1246. ***************
  1247. *** 92,99 ****
  1248.       time_t actime;
  1249.       time_t modtime;
  1250.        };
  1251. - #  else
  1252. - #   include <sys/time.h>
  1253.   #  endif
  1254.   #  define RESTORE_ATIME
  1255.   # else
  1256. --- 92,97 ----
  1257.  
  1258. Index: src/transports/smtplib.c
  1259. ***************
  1260. *** 1,4 ****
  1261. ! /* @(#)src/transports/smtplib.c    1.6 11 Nov 1991 07:49:28 */
  1262.   
  1263.   /*
  1264.    *    Copyright (C) 1987, 1988 Ronald S. Karr and Landon Curt Noll
  1265. --- 1,4 ----
  1266. ! /* @(#)src/transports/smtplib.c    1.7 09 Dec 1991 01:18:16 */
  1267.   
  1268.   /*
  1269.    *    Copyright (C) 1987, 1988 Ronald S. Karr and Landon Curt Noll
  1270. ***************
  1271. *** 288,294 ****
  1272.        * send the message, using the hidden dot protocol.
  1273.        */
  1274.       smtpb->tp->flags |= PUT_DOTS;
  1275. !     success = write_message(smtpb->out, tp, (struct addr *)NULL);
  1276.   
  1277.       if (success == WRITE_FAIL) {
  1278.       insert_addr_list(okay, defer, write_failed(tp));
  1279. --- 288,294 ----
  1280.        * send the message, using the hidden dot protocol.
  1281.        */
  1282.       smtpb->tp->flags |= PUT_DOTS;
  1283. !     success = write_message(smtpb->out, tp, addr);
  1284.   
  1285.       if (success == WRITE_FAIL) {
  1286.       insert_addr_list(okay, defer, write_failed(tp));
  1287.  
  1288. Index: util/dbm_compat.h
  1289. ***************
  1290. *** 1,4 ****
  1291. ! /* @(#)util/dbm_compat.h    1.1 21 Oct 1991 00:45:01 */
  1292.   
  1293.   /*
  1294.    * dbm_compat.h:
  1295. --- 1,4 ----
  1296. ! /* @(#)util/dbm_compat.h    1.3 09 Dec 1991 01:37:41 */
  1297.   
  1298.   /*
  1299.    * dbm_compat.h:
  1300. ***************
  1301. *** 13,19 ****
  1302.   static DBM *db;
  1303.   #define dbminit(f) \
  1304.     ((db = dbm_open((f),2,0)) ? 0 : (db = dbm_open((f),0,0)) ? 0 : -1)
  1305. ! #define dbmclose()  (db ? (void)dbm_close(db) : (void)0, db = NULL, 0)
  1306.   #define store(k,v)  dbm_store(db,k,v,DBM_INSERT)
  1307.   #define fetch(k)    dbm_fetch(db,k)
  1308.   
  1309. --- 13,19 ----
  1310.   static DBM *db;
  1311.   #define dbminit(f) \
  1312.     ((db = dbm_open((f),2,0)) ? 0 : (db = dbm_open((f),0,0)) ? 0 : -1)
  1313. ! #define dbmclose()  ((db ? (dbm_close(db),0) : 0), db = (DBM *)NULL, 0)
  1314.   #define store(k,v)  dbm_store(db,k,v,DBM_INSERT)
  1315.   #define fetch(k)    dbm_fetch(db,k)
  1316.   
  1317. ***************
  1318. *** 28,30 ****
  1319. --- 28,34 ----
  1320.   
  1321.   #undef NULL        /* in case dbm.h does not define NULL */
  1322.   #define NULL 0
  1323. + #ifndef HAVE_DBM    /* we now support the old-style dbm functions */
  1324. + #define HAVE_DBM
  1325. + #endif
  1326.  
  1327. Index: util/mkdbm.c
  1328. ***************
  1329. *** 1,4 ****
  1330. ! /* @(#)util/mkdbm.c    1.5 26 Oct 1991 22:40:38 */
  1331.   
  1332.   /*
  1333.    *    Copyright (C) 1987, 1988 Ronald S. Karr and Landon Curt Noll
  1334. --- 1,4 ----
  1335. ! /* @(#)util/mkdbm.c    1.6 09 Dec 1991 00:29:49 */
  1336.   
  1337.   /*
  1338.    *    Copyright (C) 1987, 1988 Ronald S. Karr and Landon Curt Noll
  1339. ***************
  1340. *** 25,30 ****
  1341. --- 25,34 ----
  1342.   #include "exitcodes.h"
  1343.   #include "extern.h"
  1344.   
  1345. + #if !defined(HAVE_GETHOSTNAME) && defined(HAVE_UNAME)
  1346. + #include <sys/utsname.h>
  1347. + #endif
  1348.   #if    !defined(HAVE_DBM) && !defined(HAVE_NDBM)
  1349.   
  1350.   /*ARGSUSED*/
  1351. ***************
  1352. *** 136,150 ****
  1353.       datum key_lastmod, val_lastmod;
  1354.       datum key_master,  val_master;
  1355.       long now;
  1356. !     char nows[32], host[64];
  1357.   
  1358. !     (void) time(&now);
  1359. !     sprintf(nows, "%10.10ld", now);
  1360.   
  1361.       if(gethostname(host, sizeof(host)) < 0) {
  1362.           done(EX_DATAERR);
  1363.       }
  1364.   
  1365.       key_lastmod.dptr  = "YP_LAST_MODIFIED";
  1366.       key_lastmod.dsize = strlen(key_lastmod.dptr);
  1367.       val_lastmod.dptr  = nows;
  1368. --- 140,194 ----
  1369.       datum key_lastmod, val_lastmod;
  1370.       datum key_master,  val_master;
  1371.       long now;
  1372. !     char nows[32];
  1373.   
  1374. ! #ifdef HAVE_GETHOSTNAME
  1375. !     char host[256];
  1376.   
  1377.       if(gethostname(host, sizeof(host)) < 0) {
  1378.           done(EX_DATAERR);
  1379.       }
  1380. + #else
  1381. + #ifdef HAVE_UNAME
  1382. +     struct utsname utsname;
  1383. +     char *host;
  1384.   
  1385. +     (void) uname(&utsname);
  1386. +     host = utsname.nodename;
  1387. + #else
  1388. + #ifdef SITENAME_FILE
  1389. +     char host[4096];
  1390. +     FILE *f;
  1391. +     char *p;
  1392. +     f = fopen(SITENAME_FILE, "r");
  1393. +     if (f == NULL) {
  1394. +         fprintf(stderr, "%s: cannot open ", program);
  1395. +         perror(SITENAME_FILE);
  1396. +         done(EX_OSFILE);
  1397. +     }
  1398. +     host[0] = '\0';
  1399. +     fgets(host, sizeof(host), f);
  1400. +     if (host[0] == '\0') {
  1401. +         fprintf(stderr, "%s: no hostname found in %s\n",
  1402. +             program, SITENAME_FILE);
  1403. +         exit(EX_OSFILE);
  1404. +     }
  1405. +     p = strchr(host, '\n');
  1406. +     if (p)
  1407. +         *p = '\0';
  1408. +     fclose(f);
  1409. + #else
  1410. +     fprintf(stderr, "%s: No known method for computing hostname\n",
  1411. +         program);
  1412. +     done(EX_USAGE);
  1413. + #endif    /* SITENAME_FILE */
  1414. + #endif    /* HAVE_UNAME */
  1415. + #endif    /* HAVE_GETHOSTNAME */
  1416. +     (void) time(&now);
  1417. +     sprintf(nows, "%10.10ld", now);
  1418.       key_lastmod.dptr  = "YP_LAST_MODIFIED";
  1419.       key_lastmod.dsize = strlen(key_lastmod.dptr);
  1420.       val_lastmod.dptr  = nows;
  1421. ***************
  1422. *** 167,172 ****
  1423. --- 211,217 ----
  1424.           done(EX_DATAERR);
  1425.       }
  1426.   }
  1427.   /*
  1428.    * for errors or signals, remove the temp files
  1429.    */
  1430.  
  1431. Index: util/mkuuwho.sh
  1432. ***************
  1433. *** 1,5 ****
  1434.   #! /bin/sh
  1435. ! # @(#)util/mkuuwho.sh    1.6 03 Nov 1991 01:52:58
  1436.   #
  1437.   #    Copyright (C) 1988 Ronald S. Karr and Landon Curt Noll
  1438.   #
  1439. --- 1,5 ----
  1440.   #! /bin/sh
  1441. ! # @(#)util/mkuuwho.sh    1.7 09 Dec 1991 01:09:04
  1442.   #
  1443.   #    Copyright (C) 1988 Ronald S. Karr and Landon Curt Noll
  1444.   #
  1445. ***************
  1446. *** 49,56 ****
  1447.   UUWHO_USE_DBM="X_UUWHO_USE_DBM_X"
  1448.   DBM=
  1449.   case "$HAVE_DBM" in
  1450. ! ?)    case "$UUWHO_USE_DBM" in
  1451. !     ?)    DBM=yes;;
  1452.       esac;;
  1453.   esac
  1454.   
  1455. --- 49,56 ----
  1456.   UUWHO_USE_DBM="X_UUWHO_USE_DBM_X"
  1457.   DBM=
  1458.   case "$HAVE_DBM" in
  1459. ! ?*)    case "$UUWHO_USE_DBM" in
  1460. !     ?*)    DBM=yes;;
  1461.       esac;;
  1462.   esac
  1463.   
  1464. ***************
  1465. *** 118,124 ****
  1466.   # clear out the tempory uuwho database
  1467.   #
  1468.   case "$DBM" in
  1469. ! ?)    rm -f $TUUWHO_DATA.dir $TUUWHO_DATA.pag;;
  1470.   *)    rm -f $TUUWHO_DATA;;
  1471.   esac
  1472.   
  1473. --- 118,124 ----
  1474.   # clear out the tempory uuwho database
  1475.   #
  1476.   case "$DBM" in
  1477. ! ?*)    rm -f $TUUWHO_DATA.dir $TUUWHO_DATA.pag;;
  1478.   *)    rm -f $TUUWHO_DATA;;
  1479.   esac
  1480.   
  1481. ***************
  1482. *** 141,147 ****
  1483.       /bin/sh "$SHELL_ARGS" | eval "$UUWHO" -i -d "$TUUWHO_DATA" -
  1484.   fi
  1485.   case "$DBM" in
  1486. ! ?)    mv -f $TUUWHO_DATA.dir $UUWHO_DATA.dir    # begin race condition - XXX
  1487.       mv -f $TUUWHO_DATA.pag $UUWHO_DATA.pag    # end race condition - XXX
  1488.       ;;
  1489.   *)    mv -f $TUUWHO_DATA $UUWHO_DATA
  1490. --- 141,147 ----
  1491.       /bin/sh "$SHELL_ARGS" | eval "$UUWHO" -i -d "$TUUWHO_DATA" -
  1492.   fi
  1493.   case "$DBM" in
  1494. ! ?*)    mv -f $TUUWHO_DATA.dir $UUWHO_DATA.dir    # begin race condition - XXX
  1495.       mv -f $TUUWHO_DATA.pag $UUWHO_DATA.pag    # end race condition - XXX
  1496.       ;;
  1497.   *)    mv -f $TUUWHO_DATA $UUWHO_DATA
  1498.  
  1499. Index: util/unsharmap.c
  1500. ***************
  1501. *** 1,4 ****
  1502. ! /* @(#)util/unsharmap.c    1.6 28 Sep 1991 22:33:51 */
  1503.   /*
  1504.    *    Copyright (C) 1988 Ronald S. Karr and Landon Curt Noll
  1505.    * 
  1506. --- 1,4 ----
  1507. ! /* @(#)util/unsharmap.c    1.7 09 Dec 1991 14:34:21 */
  1508.   /*
  1509.    *    Copyright (C) 1988 Ronald S. Karr and Landon Curt Noll
  1510.    * 
  1511. ***************
  1512. *** 150,157 ****
  1513.       while (fgets(filename, BUFSIZ, stdin) != NULL) {
  1514.   
  1515.       if ((p = check_newline(filename)) == NULL) {
  1516. !         sprintf(err, "error: filename longer than %d chars\n",
  1517. !             program, BUFSIZ-2);
  1518.           logit(err);
  1519.           sprintf(err, "exiting: status: 2 -  %s", get_date());
  1520.           logit(err);
  1521. --- 150,156 ----
  1522.       while (fgets(filename, BUFSIZ, stdin) != NULL) {
  1523.   
  1524.       if ((p = check_newline(filename)) == NULL) {
  1525. !         sprintf(err, "error: filename longer than %d chars\n", BUFSIZ-2);
  1526.           logit(err);
  1527.           sprintf(err, "exiting: status: 2 -  %s", get_date());
  1528.           logit(err);
  1529. ***************
  1530. *** 168,188 ****
  1531.   
  1532.       lineno = 0;            /* clear the line count */
  1533.       if (filename[0] == '/' || newsspool == NULL) {
  1534. !         article = fopen(filename, "r");
  1535.       } else {
  1536.           pathname = xmalloc(strlen(filename) + strlen(newsspool) + 2);
  1537.           sprintf(pathname, "%s/%s", newsspool, filename);
  1538. -         article = fopen(pathname, "r");
  1539. -         free(pathname);
  1540.       }
  1541.       if (article == NULL) {
  1542.           sprintf(err, "error: cannot open article: %s\n", pathname);
  1543.           logit(err);
  1544.           ++errors;
  1545.           continue;
  1546.       }
  1547.       sprintf(err, "filename: %s\n", pathname);
  1548.       logit(err);
  1549.   
  1550.       /*
  1551.        * verify the article header
  1552. --- 167,190 ----
  1553.   
  1554.       lineno = 0;            /* clear the line count */
  1555.       if (filename[0] == '/' || newsspool == NULL) {
  1556. !         pathname = xmalloc(strlen(filename) + 1);
  1557. !         strcpy(pathname, filename);
  1558.       } else {
  1559.           pathname = xmalloc(strlen(filename) + strlen(newsspool) + 2);
  1560.           sprintf(pathname, "%s/%s", newsspool, filename);
  1561.       }
  1562. +     article = fopen(pathname, "r");
  1563.       if (article == NULL) {
  1564.           sprintf(err, "error: cannot open article: %s\n", pathname);
  1565.           logit(err);
  1566. +         free(pathname);
  1567.           ++errors;
  1568.           continue;
  1569.       }
  1570.       sprintf(err, "filename: %s\n", pathname);
  1571.       logit(err);
  1572. +     free(pathname);
  1573.   
  1574.       /*
  1575.        * verify the article header
  1576.